<?php
Class Com_Login
{     
    public function check_credential($username, $password)
    {
        require_once 'DBConnection.php';
        $db_connect = new DB_Connection();
        $db_connect->connect();
        $query=  mysql_query("select * from admin_data where status = 1");
        while($row=  mysql_fetch_array($query))
        {
            //echo '<br/>'.$username.'<br/>';
            //echo '<br/>'.$password.'<br/>';
            //echo '<br/>'.$row["username"].'<br/>';
            //echo '<br/>'.$row["password"].'<br/>';
            if ($username == $row["username"] and $password==$row["password"])
            {
                return true;
            }
            //return false;
        }
        $db_connect->disconnect();
     }   
}
?>
